<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>float</title>
    <style>
        /* float 用于创建浮动框，分为左浮动(float: left;),右浮动(float: right;)，
        若并排盒子，则中间没有缝隙 */
        .left {
            width: 300px;
            height: 200px;
            background-color: pink;
            text-align: center;
            line-height: 200px;
            float: left;
        }

        .right {
            width: 300px;
            height: 200px;
            background-color: pink;
            text-align: center;
            line-height: 200px;
            float: right;
        }
    </style>
</head>

<body>
    <div class="left">青龙大人</div>
    <div class="right">白虎大人</div>
</body>

</html>